/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.openbrew.openbrewrf;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author chapmand
 */
@Entity
@Table(name = "FermentationNotes")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FermentationNotes.findAll", query = "SELECT f FROM FermentationNotes f"),
    @NamedQuery(name = "FermentationNotes.findByFermNotesID", query = "SELECT f FROM FermentationNotes f WHERE f.fermNotesID = :fermNotesID"),
    @NamedQuery(name = "FermentationNotes.findByFermNotesTemp", query = "SELECT f FROM FermentationNotes f WHERE f.fermNotesTemp = :fermNotesTemp"),
    @NamedQuery(name = "FermentationNotes.findByFermNotesGravity", query = "SELECT f FROM FermentationNotes f WHERE f.fermNotesGravity = :fermNotesGravity"),
    @NamedQuery(name = "FermentationNotes.findByFermNotesDate", query = "SELECT f FROM FermentationNotes f WHERE f.fermNotesDate = :fermNotesDate"),
    @NamedQuery(name = "FermentationNotes.findByFermNotesTime", query = "SELECT f FROM FermentationNotes f WHERE f.fermNotesTime = :fermNotesTime"),
    @NamedQuery(name = "FermentationNotes.findByFermNotesNotes", query = "SELECT f FROM FermentationNotes f WHERE f.fermNotesNotes = :fermNotesNotes"),
    @NamedQuery(name = "FermentationNotes.findByDiacetylRest", query = "SELECT f FROM FermentationNotes f WHERE f.diacetylRest = :diacetylRest"),
    @NamedQuery(name = "FermentationNotes.findByYeastCrash", query = "SELECT f FROM FermentationNotes f WHERE f.yeastCrash = :yeastCrash")})
public class FermentationNotes implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "fermNotesID")
    private Integer fermNotesID;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fermNotesTemp")
    private float fermNotesTemp;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fermNotesGravity")
    private float fermNotesGravity;
    @Column(name = "fermNotesDate")
    @Temporal(TemporalType.DATE)
    private Date fermNotesDate;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fermNotesTime")
    @Temporal(TemporalType.TIME)
    private Date fermNotesTime;
    @Basic(optional = false)
    @NotNull
    @Size(min = 0, max = 250)
    @Column(name = "fermNotesNotes")
    private String fermNotesNotes;
    @Basic(optional = false)
    @NotNull
    @Column(name = "diacetylRest")
    private boolean diacetylRest;
    @Basic(optional = false)
    @NotNull
    @Column(name = "yeastCrash")
    private boolean yeastCrash;

    public FermentationNotes() {
    }

    public FermentationNotes(Integer fermNotesID) {
        this.fermNotesID = fermNotesID;
    }

    public FermentationNotes(Integer fermNotesID, float fermNotesTemp, float fermNotesGravity, Date fermNotesTime, String fermNotesNotes, boolean diacetylRest, boolean yeastCrash) {
        this.fermNotesID = fermNotesID;
        this.fermNotesTemp = fermNotesTemp;
        this.fermNotesGravity = fermNotesGravity;
        this.fermNotesTime = fermNotesTime;
        this.fermNotesNotes = fermNotesNotes;
        this.diacetylRest = diacetylRest;
        this.yeastCrash = yeastCrash;
    }

    public Integer getFermNotesID() {
        return fermNotesID;
    }

    public void setFermNotesID(Integer fermNotesID) {
        this.fermNotesID = fermNotesID;
    }

    public float getFermNotesTemp() {
        return fermNotesTemp;
    }

    public void setFermNotesTemp(float fermNotesTemp) {
        this.fermNotesTemp = fermNotesTemp;
    }

    public float getFermNotesGravity() {
        return fermNotesGravity;
    }

    public void setFermNotesGravity(float fermNotesGravity) {
        this.fermNotesGravity = fermNotesGravity;
    }

    public Date getFermNotesDate() {
        return fermNotesDate;
    }

    public void setFermNotesDate(Date fermNotesDate) {
        this.fermNotesDate = fermNotesDate;
    }

    public Date getFermNotesTime() {
        return fermNotesTime;
    }

    public void setFermNotesTime(Date fermNotesTime) {
        this.fermNotesTime = fermNotesTime;
    }

    public String getFermNotesNotes() {
        return fermNotesNotes;
    }

    public void setFermNotesNotes(String fermNotesNotes) {
        this.fermNotesNotes = fermNotesNotes;
    }

    public boolean getDiacetylRest() {
        return diacetylRest;
    }

    public void setDiacetylRest(boolean diacetylRest) {
        this.diacetylRest = diacetylRest;
    }

    public boolean getYeastCrash() {
        return yeastCrash;
    }

    public void setYeastCrash(boolean yeastCrash) {
        this.yeastCrash = yeastCrash;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (fermNotesID != null ? fermNotesID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FermentationNotes)) {
            return false;
        }
        FermentationNotes other = (FermentationNotes) object;
        if ((this.fermNotesID == null && other.fermNotesID != null) || (this.fermNotesID != null && !this.fermNotesID.equals(other.fermNotesID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.openbrew.openbrewrf.FermentationNotes[ fermNotesID=" + fermNotesID + " ]";
    }
    
}
